//
//  KSBtnItem.swift
//  ANOA
//
//  Created by 邱仙凯 on 2024/1/9.
//  Copyright © 2024 zwb. All rights reserved.
//

import UIKit

class KSBtnItem: KSFormHItem {
    lazy var btn:UIButton = {
       let v = UIButton()
        v.backgroundColor = .systemBlue
        v.layer.cornerRadius = 5
        v.isUserInteractionEnabled = false
         return v
    }()
 
    override func disabledChange() {
         self.btn.isUserInteractionEnabled = !disabled
      }
   
    convenience init(title:String,appearance: KSFormBaseAppear? = KSFormBaseAppear()) {
        self.init(title: title, appearance: appearance,type:.switchx)
        btn.setTitle(self.tpTitleLab.text, for: .normal)
        self.tpTitleLab.isHidden = true
//        self.arrowMark.isHidden = true
        self.addSubview(btn)
        btn.snp.makeConstraints { make in
             make.height.equalTo(30)
            make.width.equalTo(180)
            make.centerY.equalTo(self)
            make.left.equalToSuperview().offset(10)
        }
      }
    
}
 
